package hw_8_3.thread_demo2;

public class MyRunnableTest {
    public static void main(String[] args) {
        Runnable target = new MyRunnable();
        Thread newThread = new Thread(target);
        newThread.setName("新线程");
        newThread.start();
        Thread thread1 = Thread.currentThread();
        thread1.setName("主线程");
        for (int i = 1; i <= 100; i++) {
            System.out.println(thread1.getName() + "打印的第" + i + "个：" + "main");
        }
    }
}
